/**
 * RecordDetailsInfoItem
 * @Author ace.ch
 * @Date 2018/3/28 14:53
 */
class RecordDetailsInfoItem extends BaseSprite {

    lab_rank: eui.Label;
    lab_roomid: eui.Label;
    lab_time: eui.Label;
    btn_reback: eui.Button;

    constructor() {
        super();

        this.skinName = 'RecordDetailsInfoItemSkin';
    }

    childrenCreated() {
        super.childrenCreated();

        // gameManager.i.addEventListener(GameEventType.UPDATE_RECORD_DETAILS_TYPE, this.setType, this);
    }

    setType(type: number) {
        switch (type) {
            case 1:
                this.skinState = 'daikai';
                break;
            case 2:
                this.skinState = 'circle';
                break;
            case 3:
                this.skinState = 'normal';
                break;
        }
    }

    set rank(v) {
        this.lab_rank.text = v;
    }

    set roomid(v) {
        this.lab_roomid.text = '房间:' + v;
    }

    set time(v) {
        this.lab_time.text = '时间:' + v;
    }
}